package com.summer.jdbc.view;

import com.summer.jdbc.dao.AdminDao;
import com.summer.jdbc.po.Admin;

import java.util.Scanner;

public class AdminView {
    private final Scanner input = new Scanner(System.in);
    public Admin login() {
        System.out.println("请输入管理员名称：");
        String adminName = input.next();
        System.out.println("请输入密码：");
        String password = input.next();

        AdminDao dao = new AdminDao();
        return dao.getAdminByNameByPass(adminName, password);
    }
}
